Skip to main content

2.20.3. Response

FieldDescriptionType
statussuccess | error
codeError codeInteger
docStatus0 - invoice not closed, 1 - invoice closedInteger
printTimeDate and time of document closing, format: yyyy-MM-dd hh:mm:ssString
fiscalIDFiscal document code (use for returns)String
fiscalNumDocument numberString
items [{...}]Array
totalPayments [{...}]Array

items structure​

FieldDescriptionType
itemIdItem code in the accounting systemInteger
itemCodeTypeItem code type in the accounting system (optional)Integer
itemNameItem nameInteger
itemAttrAdditional attributes for the item (1 - prepayment service), (optional)Integer
itemUnitUnit of measurement (optional)Integer
itemQtyQuantity * 1000Integer
itemPricePrice from the price list in kopecksInteger
itemFinalPricePrice with discount in kopecksInteger
itemAmountAmount to be paid in kopecksInteger
itemFinalAmountAmount to be paid in kopecksInteger
discountDiscount amount in kopecks (optional)Integer
discountPrcDiscount percentage (optional)Numeric

totalPayments structure​

FieldDescriptionType
codePayment type codeString
amountPayment amount in kopecksInteger
rrnPayment transaction number from the bank terminalString
authAuthorization codeString
cardNumCard numberString
checkNumCheck numberString

Response structure​

{
"status": "success" | "error",
"code": "integer, error code",
//0 - no error
//1 - authorization error
//2 - incorrect JSON format
//3 - missing required parameters
"docStatus": "integer",
//0 - invoice not closed
//1 - invoice closed
"printTime": "string, date and time of document closing, format: yyyy-MM-dd hh:mm:ss",
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"items": [
{
"itemId": "string, item code in the accounting system",
"itemCodeType": "item code type in the accounting system, optional",
"itemName": "string, item name",
"itemAttr": "integer, additional attributes for the item (1 - prepayment service), optional",
"itemUnit": "unit of measurement, optional",
"itemQty": "integer, quantity * 1000",
"itemPrice": "integer, price from the price list in kopecks",
"itemFinalPrice": "integer, price with discount in kopecks",
"itemAmount": "integer, amount from the price list in kopecks",
"itemFinalAmount": "integer, amount to be paid in kopecks",
"discount": "integer, discount amount in kopecks, optional",
"discountPrc": "numeric, discount percentage, optional"
}
],
"totalPayments": [ "Array of document payments",
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks",
"rrn": "string, payment transaction number from the bank terminal",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number"
}
]
}